/*
 * @Author: your name
 * @Date: 2020-08-24 08:56:47
 * @LastEditTime: 2021-05-28 10:50:28
 * @LastEditors: 汪滔
 * @Description: In User Settings Edit
 * @FilePath: \xmgj-app-new\js\containers\logistics-platform\shipper-app\source\components\FlagView.js
 */
import React from 'react';
import { StyleSheet, Text } from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
import { px2dp } from '@/styles';
/**
 * @author kanglang
 * @description 起->终 标记
 * @createDate 2020/7/27
 */
export default function FlagView(
  { style, colors = ['#7EE35E', '#2CBD26'], tips = '马' } = this.props
) {
  return (
    <LinearGradient
      style={[styles.common, style]}
      stystart={{ x: 1, y: 1 }}
      end={{ x: 1, y: 1 }}
      colors={colors}
    >
      <Text style={styles.tips}>{tips}</Text>
    </LinearGradient>
  );
}
const styles = StyleSheet.create({
  common: {
    height: px2dp(16) * 2,
    width: px2dp(16) * 2,
    borderRadius: px2dp(3) * 2,
    justifyContent: 'center',
    alignItems: 'center'
  },
  tips: {
    color: '#FFFFFF',
    fontSize: px2dp(11) * 2,
    fontWeight: 'bold'
  }
});
